From 4701c2dcb18e264b93536438798a6063832c0838 Mon Sep 17 00:00:00 2001 From: Ell Date: Thu, 14 Jun 2018 01:54:52 -0400 Subject: [PATCH] babl-fish: fix concurrent babl_fish()/process() calls with palette formats In babl_fish(), don't call _babl_fish_rig_dispatch() on existing path fishes during each lookup. We already call this function on all path fishes upon creation (in particular, after commit b34a9672c8c9a42923a8f0b2650af30b1efe635c), so this isn't necessary. This fixes an issue where the _babl_fish_rig_dispatch() call in babl_fish() would temporarily modify the value of babl->fish.data, causing a concurrent babl_process[_rows]() call in another thread to pass the wrong 'data' value down to the conversion function. In particular, this could cause palette conversions to segfault. --- babl/babl-fish.c | 1 - 1 file changed, 1 deletion(-) diff --git a/babl/babl-fish.c b/babl/babl-fish.c index 8c73a2b..749b075 100644 --- a/babl/babl-fish.c +++ b/babl/babl-fish.c @@ -257,7 +257,6 @@ babl_fish (const void *source, if (ffish.fish_path) { /* we have found suitable fish path in the database */ - _babl_fish_rig_dispatch (ffish.fish_path); return ffish.fish_path; } -- 2.30.2